package com.yunxi.service.localService.impl.sto;

import com.github.pagehelper.PageInfo;
import com.yunxi.core.page.PageHelperPlus;
import com.yunxi.sto.pojo.MonthlyReportVO;
import com.yunxi.sto.pojo.ReportPartnerMonthVO;
import com.yunxi.sto.pojo.YearReportVO;
import org.springframework.stereotype.Service;
import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.sto.ReportPartnerMonthMapper;
import com.yunxi.model.sto.ReportPartnerMonth;
import com.yunxi.service.localService.sto.ReportPartnerMonthService;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Guan
 * @since 2020-03-11
 */
@Service
public class ReportPartnerMonthServiceImpl extends ServiceImplPlus<ReportPartnerMonthMapper, ReportPartnerMonth> implements ReportPartnerMonthService {

    @Override
    public Long getByReportDate(String curYearMonth) {
        return baseMapper.getByReportDate(curYearMonth);
    }

    @Override
    public PageInfo<MonthlyReportVO> monthList3(ReportPartnerMonthVO reportPartnerMonth, Integer pageNum, Integer pageSize) {

        PageHelperPlus.startPage(pageNum,pageSize);
        List<MonthlyReportVO> list = baseMapper.monthList3(reportPartnerMonth);
        PageInfo<MonthlyReportVO> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
